package handlers

import (
	"github.com/gin-gonic/gin"
	"sys-nav/models"
)

func OrderAdd(c *gin.Context) {
	ordername := c.PostForm("ordername")
	ordertype := c.PostForm("ordertype")
	data := models.Order{
		OrderName: ordername,
		OrderType: ordertype,
	}
	models.DB.Create(&data)
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "ok",
	})
	return
}
